package com.zyd.shiro.persistence.dao;

import com.zyd.shiro.business.entity.Categories;
import com.zyd.shiro.persistence.beans.Channel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * 数据访问接口
 *
 * @author Zor
 */
public interface SysChannelDao extends JpaRepository<Channel, Integer>, JpaSpecificationExecutor<Channel> {

    @Query(value = "SELECT * FROM sys_channel  WHERE user_id=?1",nativeQuery = true)
    Channel getChannelByUserId(Integer uid);
}
